<template>
  <div>
    <div class="warn-top">
      <h4 style="text-align: left; color: #126bff">通知通告</h4>
      <!--         :rules="rules" -->
      <el-form
        ref="elForm"
        :model="formData"
        size="medium"
        label-width="80px"
        style="display: flex"
      >
        <el-form-item
          label="标题:"
          prop="deviceName"
          style="width: 450px; float: left"
        >
          <el-input
            v-model="formData.deviceName"
            placeholder="请输入标题"
            clearable
            :style="{ width: '300px' }"
          >
          </el-input>
        </el-form-item>
        <el-form-item
          label="添加时间:"
          prop="time"
          style="width: 450px; float: left"
        >
          <el-date-picker
            type="daterange"
            v-model="formData.time"
            format="yyyy-MM-dd"
            value-format="yyyy-MM-dd"
            :style="{ width: '300px' }"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            range-separator="至"
            clearable
          ></el-date-picker>
        </el-form-item>
        <el-form-item size="small ">
          <el-button @click="resetForm()" id="reset">重置</el-button>
          <el-button
            type="primary"
            @click="submitForm(formData)"
            id="submitForm"
            >查询</el-button
          >
        </el-form-item>
      </el-form>
    </div>
    <!-- 表格 -->
    <div class="warn-content" style="width: 100%">
      <div>
        <el-button icon="el-icon-plus" @click="PublishNotice"
          >发布通知</el-button
        >
      </div>
      <el-table
        ref="multipleTable"
        :data="
          tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)
        "
        style="width: 100%; cursor: pointer"
      >
        <el-table-column prop="id" label="序号" width="100"> </el-table-column>
        <el-table-column prop="imageUrl" label="封面"> </el-table-column>
        <el-table-column prop="title" label="标题"> </el-table-column>
        <el-table-column prop="abstract" label="摘要"> </el-table-column>
        <el-table-column prop="peopleType" label="通知人员类型">
        </el-table-column>
        <el-table-column prop="time" label="时间"> </el-table-column>
        <el-table-column label="操作">
          <template slot-scope="scope">
            <div>
              <el-button
                @click="detailClick(scope.row)"
                type="text"
                size="small"
                >详情</el-button
              >
            </div>
          </template>
        </el-table-column>
      </el-table>
      <!-- 分页器 -->
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-sizes="[20, 30, 40]"
        :page-size="pageSize"
        layout="total, prev, pager, next, sizes"
        :total="tableData.length"
        style="float: right; margin-top: 20px"
      >
      </el-pagination>
    </div>
    <div></div>
    <!-- 发布通知弹窗 -->
    <div id="notice">
      <el-dialog
        title="发布通知"
        :visible.sync="noticeDialogVisible"
        width="1150px"
        :before-close="handleClose"
        top="0"
      >
        <div>
          <el-form :model="form" id="el_form">
            <el-form-item
              label="通知人员类型:"
              prop="peopleType"
              label-width="100px"
            >
              <el-select
                v-model="form.peopleType"
                placeholder="请选择通知人员类型"
                clearable
              >
                <el-option
                  v-for="(item, index) in peopleType"
                  :key="index"
                  :label="item.label"
                  :value="item.value"
                  :disabled="item.disabled"
                ></el-option>
              </el-select>
            </el-form-item>
            <hr />
            <el-form-item class="inputTile">
              <el-input
                v-model="form.title"
                autocomplete="off"
                placeholder="请输入标题"
                style="border: none"
              ></el-input>
            </el-form-item>
            <el-form-item id="editor">
              <quill-editor
                class="editor"
                v-model="form.content"
                ref="myQuillEditor"
                :options="editorOption"
                @blur="onEditorBlur($event)"
                @focus="onEditorFocus($event)"
                @change="onEditorChange($event)"
                style="width: 100%; color: black"
              >
              </quill-editor>
              <!-- <editor :count="count"></editor> -->
            </el-form-item>
            <p
              style="
                text-align: left;
                font-size: 24px;
                font-family: Microsoft YaHei-Regular, Microsoft YaHei;
                font-weight: 400;
                color: #13213b;
                margin: 10px 0 10px 0;
              "
            >
              封面和摘要
            </p>

            <el-form-item id="upload">
              <el-upload
                class="avatar-uploader"
                action=""
                :show-file-list="false"
                :on-success="handleAvatarSuccess"
                :before-upload="beforeAvatarUpload"
              >
                <img v-if="form.imageUrl" :src="form.imageUrl" class="avatar" />
                <i
                  v-else
                  class="el-icon-plus avatar-uploader-icon"
                  style="
                    width: 100px;
                    height: 100px;
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                  "
                ></i>
              </el-upload>
              <textarea
                name=""
                id=""
                cols="20"
                v-model="form.abstract"
                placeholder="请输入摘要内容"
              ></textarea>
            </el-form-item>
          </el-form>
        </div>
        <span slot="footer" class="dialog-footer">
          <el-button @click="cancelEditor" class="cancel">取 消</el-button>
          <el-button type="primary" @click="confirmEditor" class="confirm"
            >确 定</el-button
          >
        </span>
      </el-dialog>
    </div>
    <!-- {{test}} -->
    <!-- 详情弹窗 -->
    <div id="detail">
      <detailDialog
        :dialogVsible="Visible"
        :detail="detaile"
        :SchoolNoticeVisible="SchoolNoticeVisible"
        @handel="handel"
        @Confirm="Confirm"
      ></detailDialog>
    </div>
  </div>
</template>
<script>
import { Quill, quillEditor } from "vue-quill-editor";
import "quill/dist/quill.core.css"; // import styles
import "quill/dist/quill.snow.css"; // for snow theme
import "quill/dist/quill.bubble.css"; // for bubble theme
let Size = Quill.import("attributors/style/size");
Size.whitelist = ["10px", "12px", "16px", "18px", "20px", "30px", "32px"];
Quill.register(Size, true);
// 自定义字体类型
var fonts = [
  "SimSun",
  "SimHei",
  "Microsoft-YaHei",
  "KaiTi",
  "FangSong",
  "Arial",
  "sans-serif",
];
var Font = Quill.import("formats/font");
Font.whitelist = fonts;
Quill.register(Font, true);
// 定制toolbar
const toolbarOptions = [
  ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线 -----['bold', 'italic', 'underline', 'strike']
  ["blockquote", "code-block"], // 引用  代码块-----['blockquote', 'code-block']
  [{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表-----[{ list: 'ordered' }, { list: 'bullet' }]
  [{ header: 1 }, { header: 2 }],
  [{ script: "sub" }, { script: "super" }], // 上标/下标-----[{ script: 'sub' }, { script: 'super' }]
  [{ indent: "-1" }, { indent: "+1" }],
  [{ size: Size.whitelist }], // 配置字号
  [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题-----[{ header: [1, 2, 3, 4, 5, 6, false] }]
  [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色-----[{ color: [] }, { background: [] }]
  [{ font: Font.whitelist }], //显示字体选择
  [{ align: [] }], // 对齐方式-----[{ align: [] }]
  ["clean"], // 清除文本格式-----['clean']
  ["link", "image"], // 链接、图片、视频-----['link', 'image', 'video']
];
import detailDialog from "@/components/detailDetail";
export default {
  name: "WARN",
  components: {
    quillEditor,
    detailDialog,
    // editor,
  },
  data() {
    return {
      Visible: false,
      total: "",
      SchoolNoticeVisible: false,
      test: "11",
      // 按页数查询数据
      currentPage: 1,
      pageSize: 20,
      formData: {
        deviceName: "",
        time: "",
        deviceId: "",
      },
      detaile: {},
      tableData: [
        {
          id: 1,
          peopleType: "1", // 通知人员类型
          title: "2545", // 请输入标题
          content: "3", // 正文内容
          imageUrl: "1111", // 封面 require("@/assets/logo.png")
          abstract: "5", // 摘要
          time: "2023-9-23",
        },
        {
          id: 1,
          peopleType: "1", // 通知人员类型
          title: "2545", // 请输入标题
          content: "3", // 正文内容
          imageUrl: "1111", // 封面 require("@/assets/logo.png")
          abstract: "5", // 摘要
          time: "2023-9-23",
        },
        {
          id: 1,
          peopleType: "1", // 通知人员类型
          title: "24647", // 请输入标题
          content: "3", // 正文内容
          imageUrl: "1111", // 封面 require("@/assets/logo.png")
          abstract: "5", // 摘要
          time: "2023-9-23",
        },
        {
          id: 1,
          peopleType: "1", // 通知人员类型
          title: "2ada", // 请输入标题
          content: "3", // 正文内容
          imageUrl: "1111", // 封面 require("@/assets/logo.png")
          abstract: "5", // 摘要
          time: "2023-9-23",
        },
        {
          id: 1,
          peopleType: "1", // 通知人员类型
          title: "2afjfgncv ", // 请输入标题
          content: "3", // 正文内容
          imageUrl: "1111", // 封面 require("@/assets/logo.png")
          abstract: "5", // 摘要
          time: "2023-9-23",
        },
        {
          id: 1,
          peopleType: "1", // 通知人员类型
          title: "2asdas234", // 请输入标题
          content: "3", // 正文内容
          imageUrl: "1111", // 封面 require("@/assets/logo.png")
          abstract: "5", // 摘要
          time: "2023-9-23",
        },
        {
          id: 1,
          peopleType: "1", // 通知人员类型
          title: "2", // 请输入标题
          content: "3", // 正文内容
          imageUrl: "1111", // 封面 require("@/assets/logo.png")
          abstract: "5", // 摘要
          time: "2023-9-23",
        },
      ],
      form: {
        peopleType: "", // 通知人员类型
        title: "", // 请输入标题
        content: "", // 正文内容
        imageUrl: "", // 封面
        abstract: "", // 摘要
      },
      rules: {
        name: [
          { required: true, message: "请输入活动名称", trigger: "blur" },
          { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
        ],
      },
      peopleType: [
        {
          label: "教师",
          value: "教师",
        },
        {
          label: "保安",
          value: "保安",
        },
        {
          label: "民警",
          value: "民警",
        },
        {
          label: "护学岗人员",
          value: "护学岗人员",
        },
      ],
      formLabelWidth: "120px",
      initTableData: [], // 数据接收
      dialogVisible: false, // 详情弹窗状态
      dialogEditVisible: false, // 编辑弹窗状态
      dialogAddVisible: false, // 添加人员状态
      noticeDialogVisible: false, // 发布通知弹窗
      content: "",
      editorOption: {
        theme: "snow",
        modules: {
          toolbar: toolbarOptions,
        },
        placeholder: "请输入正文内容", //提示
        // readyOnly: false, //是否只读

        syntax: true, //语法检测
      },
      imageUrl: "",
    };
  },
  watch: {
    $route(to, from) {
      console.log(to, from);
    },
  },
  created() {
    console.log(666);
    // window.addEventListener
  },
  computed: {
    //当前富文本实例
    editor() {
      return this.$refs.editorRef.quillEditor;
    },
  },
  methods: {
    // 详情组件弹窗 取消 确认操作
    handel(e) {
      console.log("11");
      console.log(e);
      this.Visible = e;
      this.SchoolNoticeVisible = e;
    },
    Confirm(e) {
      console.log("11");
      console.log(e);
      this.Visible = e;
      this.SchoolNoticeVisible = e;
    },
    handleAvatarSuccess(res, file) {
      console.log(res);
      console.log(file);
      this.form.imageUrl = URL.createObjectURL(file.raw);
    },
    beforeAvatarUpload(file) {
      let that = this;
      console.log(file);
      const isLt2M = file.size / 1024 / 1024 < 2;
      if (!isLt2M) {
        this.$message.error("上传头像图片大小不能超过 2MB!");
      }
      return new Promise((resolve, reject) => {
        // 将文件转成base64
        const reader = new FileReader();
        reader.readAsDataURL(file);
        reader.onload = () => {
          console.log(reader.result);
          that.form.imageUrl = reader.result;
        };
        reader.onerror = (error) => reject(error);
      });
    },
    // 准备富文本编辑器
    onEditorReady(e) {
      console.log(e);
    },
    // 富文本编辑器 失去焦点事件
    onEditorBlur(e) {
      console.log(e);
    },
    // 富文本编辑器 获得焦点事件
    onEditorFocus(e) {
      console.log(e);
    },
    // 富文本编辑器 内容改变事件
    onEditorChange({ html }) {
      //内容改变事件
      console.log("内容改变事件");
    },
    confirmEditor() {
      this.noticeDialogVisible = false;
      console.log(this.form);
      this.form = {
        peopleType: "", // 通知人员类型
        title: "", // 请输入标题
        content: "", // 正文内容
        imageUrl: "", // 封面
        abstract: "", // 摘要
      };
    },
    cancelEditor() {
      this.noticeDialogVisible = false;
      this.form = {
        peopleType: "", // 通知人员类型
        title: "", // 请输入标题
        content: "", // 正文内容
        imageUrl: "", // 封面
        abstract: "", // 摘要
      };
    },
    // ==================
    // 查询信息
    submitForm(formData) {
      console.log(formData);
    },
    // 查询重置
    resetForm() {
      this.$refs["elForm"].resetFields();
      this.tableData = this.initTableData;
    },
    // 添加人员
    PublishNotice() {
      // this.dialogVisible = true;
      this.noticeDialogVisible = true;
    },

    // 编辑弹窗
    editClick(row) {
      // 编辑人员信息
      console.log(row);
      this.dialogVisible = true;
      this.alertData = row; // 弹窗信息
      console.log(this.alertData);
    },

    select(e) {
      console.log(e);
    },

    confirm() {
      // 确定;
      console.log("编辑确认");
      this.dialogVisible = false;
      this.alertData = ""; // 清空状态
    },
    // 详情弹窗相关操作
    detailClick(row) {
      console.log(row);
      this.Visible = !this.Visible;
      this.SchoolNoticeVisible = !this.SchoolNoticeVisible;
      this.$nextTick(() => {
        this.detaile = row;
      });
    },
    handleClose(done) {
      done();
    },
    // 分页器相关操作
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
      this.pageSize = val;
      this.currentPage = 1;
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
      this.currentPage = val;
      this.currentPage = val;
    },
  },
  mounted() {},
};
</script>
<style lang="scss" scoped>
#detail {
  /deep/.el-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}
/deep/.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9 !important;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  height: 100px;
  width: 180px;
}
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}
.avatar-uploader-icon {
  font-size: 50px !important;
  color: #126bff !important;
  width: 100px !important;
  height: 100px !important;
  margin: 0 auto !important;
  line-height: 178px;
  text-align: center;
  border: none !important;
}

.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
.warn-top {
  // border: 1px red solid;
  padding: 10px;
  background-color: white;
  border-radius: 10px;
  width: 100%;
  height: 120px;
  box-sizing: border-box;
}
.warn-top {
  width: calc(100%);
}
/deep/.el-form-item {
  // border: 1px red solid;
  // margin-top: 20px !important;
}
.el-table {
  width: calc(100%);
}
/deep/.el-form-item__label {
  // border: 1px red solid;
  width: 100px !important;
  height: 50px;
  line-height: 50px;
  // border: 1px red solid;
}
/deep/.el-range-editor--medium .el-range-separator {
  line-height: 21px;
  font-size: 14px;
}
/deep/ .el-range__icon {
  line-height: 21px;
}
/deep/.el-input--medium .el-input__icon {
  line-height: 44px !important;
}
.warn-content {
  margin-top: 20px;
  // border: 1px red solid;
  height: auto;
  background-color: white;
  border-radius: 10px;
  padding: 10px;
  box-sizing: border-box;
  overflow: auto;
}
.warn-content > div:nth-of-type(1) {
  display: flex;
  padding: 10px 0 10px 0;
  // border: 1px red solid;
}
.warn-content > div:nth-of-type(1) > button:nth-of-type(1) {
  font-size: small;
  width: 108px;
  height: 36px;
  background: #126bff;
  border-radius: 8px 8px 8px 8px;
  color: #ffffff;
}
.warn-content > div:nth-of-type(1) > button:nth-of-type(2) {
  font-size: small;
  color: #ffffff;
  width: 108px;
  height: 36px;
  background: #ff4444;
  border-radius: 8px 8px 8px 8px;
}
.el-table .el-table__cell {
  padding: 12px 0;
  min-width: 0;
  box-sizing: border-box;
  text-overflow: ellipsis;
  vertical-align: middle;
  position: relative;
  text-align: center;
}
.upIpfo {
  display: flex;
  width: 100%;
  // border: 1px red solid;
  justify-content: space-between;
}
.upIpfo p {
  color: #13213b;
  font-size: 14px;
  font-weight: 400;
  width: 50%;
  margin-top: 10px;
  // border: 1px red solid;
  display: inline-block;
  // background-color: skyblue;
}
/deep/.el-table__header-wrapper {
  // border: 1px red solid !important;
  border-radius: 10px 10px 0 0;
}
/deep/.el-table {
  border: 1px #d7dbe3 solid;
  border-radius: 10px;
}
/deep/.el-input--medium .el-input__icon {
  line-height: 30px;
}
/deep/.has-gutter tr th {
  color: black;
  text-align: center;
  border: 1px d7dbe3 solid;
  background-color: #ecf5ff;
}
/deep/.el-range-editor--medium .el-range-separator {
  line-height: 28px !important;
  font-size: 14px;
}
/deep/.is-leaf {
  border: 1px #d7dbe3 solid !important;
  border-top: none !important;
  border-left: none !important;
}
/deep/.el-table__cell {
  text-align: center !important;
}
/deep/.el-dialog {
  border-radius: 15px !important;
}
/deep/.el-dialog__header {
  text-align: left;
  font-weight: 600;
}
/deep/.el-dialog__body {
  padding: 0 20px 20px 20px !important;
}
/deep/.el-input--suffix .el-input__inner {
  padding-right: 0px;
}
/deep/.el-range-editor.el-input__inner {
  position: relative !important;
  right: 20px !important;
}
/deep/.el-input__inner {
  border: 1px solid #d7dbe3 !important;
  background-color: white !important;
  border-radius: 6px !important;
}
// el-table_1_column_5   el-table__cell
.rowText {
  text-overflow: ellipsis;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /*第几行裁剪*/
  -webkit-box-orient: vertical;
}
/deep/.el-switch__label.is-active {
  color: #ff4444;
}
.success {
  margin-right: 15px;
  width: 76px;
  height: 36px;
  background: #1cdc7c;
  border-radius: 10px;
  opacity: 1;
  border: none;
  color: #ffffff;
}
::v-deep.el-table th.el-table__cell {
  background-color: #ecf5ff !important;
  width: 64px !important;
  height: 21px !important;
  font-size: 16px !important;
  color: #13213b !important;
}
.refuse {
  width: 76px;
  height: 36px;
  background: #ff4444;
  border-radius: 10px;
  opacity: 1;
  border: none;
  color: #ffffff;
}
/deep/.el-switch__label.is-active {
  color: #126bff !important;
}

.pawd /deep/ .el-input__inner {
  border: 1px solid #d7dbe3 !important;
  background-color: white !important;
  border-radius: 10px 0 0 10px;
  width: 256px;
  float: left;
  position: relative;
  height: 40px !important;
}
.pawd /deep/.el-input-group__append {
  border: 1px #126bff solid;
  float: left;
  color: #126bff;
  background-color: #126bff 10%;
  border-radius: 0 10px 10px 0;
  height: 38px;
  text-align: center;
  line-height: 38px;
  width: 30px;
}
/deep/.el-upload {
  float: left !important;
}
/deep/.avatar-uploader-icon {
  border: 1px #c4c4cf solid;
  font-size: 28px;
  color: #8c939d;
  width: 50px !important;
  height: 50px !important;
  line-height: 50px !important;
  text-align: center;
}
#upload {
  /deep/.el-form-item__content {
    display: flex !important;
    width: 100% !important;
  }
  textarea {
    flex: 1;
    margin-left: 10px;
    border: 1px solid #c4c4cf;
    padding: 5px;
    width: 114px;
    font-family: Microsoft YaHei-Regular, Microsoft YaHei;
    font-weight: 400;
    color: #13213b !important;
    border-radius: 8px;
    outline: none;
  }
}
textarea::-moz-placeholder {
  font-size: 16px;
  font-family: Microsoft YaHei-Regular, Microsoft YaHei;
  font-weight: 400;
  color: #13213b;
}

textarea::-ms-input-placeholder {
  font-size: 16px;
  font-family: Microsoft YaHei-Regular, Microsoft YaHei;
  font-weight: 400;
  color: #13213b;
}

textarea::-webkit-input-placeholder {
  font-size: 16px;
  font-family: Microsoft YaHei-Regular, Microsoft YaHei;
  font-weight: 400;
  color: #13213b;
}
/deep/.el-form-item__content {
  // border: 1px red solid !important;
  margin: 6px 0 10px 0;
  box-sizing: border-box;
}
.formContent p {
  height: 50px;
  line-height: 50px;
  text-align: left;
  // color: red;
}
.formContent p span {
  display: inline-block;
  // border: 1px red solid;
  width: 78px;
  text-align: right;
}
.row > input {
  padding-left: 10px;
  outline: none;
  // border: 1px red solid;
  width: 67%;
  height: 30px;
  background: #ffffff;
  opacity: 1;
  border: 1px solid #c4c4cf;
}
// /deep/.el-input__suffix {
//   position: absolute !important;
//   top: 10px !important;
//   text-align: center !important;
// }
// 上传图片样式
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}
.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
.footerButton > button:nth-of-type(1) {
  width: 76px;
  height: 36px;
  text-align: center;
  background: #e6effa;
  border-radius: 8px;
  opacity: 1;
  color: #126bff;
}
.footerButton > button:nth-of-type(2) {
  width: 76px;
  height: 36px;
  text-align: center;
  background: #126bff;
  border-radius: 8px;
  color: #ffffff;
  opacity: 1;
}
#notice {
  /deep/.el-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  /deep/.el-form-item__content {
    width: 40%;
    .el-select {
      width: 100%;
    }
  }
}
.cancel {
  width: 79px;
  height: 36px;
  background: #e6effa;
  border-radius: 8px 8px 8px 8px;
  opacity: 1;
  border: none;
  color: #126bff;
  margin-right: 15px;
}
.confirm {
  width: 79px;
  height: 36px;
  background: #126bff;
  border-radius: 8px 8px 8px 8px;
  opacity: 1;
  color: #ffffff;
  border: none;
}
.titles {
  text-align: left;
  width: 64px;
  height: 21px;
  font-size: 16px;
  font-family: Microsoft YaHei-Bold, Microsoft YaHei;
  font-weight: bold;
  color: #13213b;
}
/deep/#editor {
  .el-form-item__content {
    width: 100%;
    // border: 1px red solid;
  }
}
.editor {
  line-height: normal !important;
  height: 280px;
  // border: 1px red solid;
}
.ql-container {
  height: 250px !important;
}
.SizeTiShi {
  font-size: 12px;
  color: #999999;
  text-align: right;
  /* margin-right: 20px; */
  margin-top: 60px;
}
/deep/.inputTile {
  // color: red !important;
  input {
    border: none !important;
    // color: red !important;
    font-size: 22px;
    font-family: Microsoft YaHei-Bold, Microsoft YaHei;
    font-weight: bold;
    color: #13213b;
  }
}
// 这里做了一个浏览器的兼容性
/deep/.inputTile :-moz-placeholder {
  font-size: 22px;
  font-family: Microsoft YaHei-Bold, Microsoft YaHei;
  font-weight: bold;
  color: #d7dbe3;
}

/deep/.inputTile :-ms-input-placeholder {
  font-size: 22px;
  font-family: Microsoft YaHei-Bold, Microsoft YaHei;
  font-weight: bold;
  color: #d7dbe3;
}

/deep/.inputTile ::-webkit-input-placeholder {
  font-size: 22px;
  font-family: Microsoft YaHei-Bold, Microsoft YaHei;
  font-weight: bold;
  color: #d7dbe3;
}
#el_form {
  .el-form-item {
    margin: 0;
  }
}
// ========================
/deep/.ql-container.ql-snow {
  height: 90% !important;
}
.ql-snow .ql-tooltip[data-mode="link"]::before {
  content: "请输入链接地址:";
}
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
  border-right: 0px;
  content: "保存";
  padding-right: 0px;
}

/deep/.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="10px"]::before,
/deep/.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="10px"]::before {
  content: "10px" !important;
  font-size: 10px;
}
/deep/.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="10px"]::before,
/deep/.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="10px"]::before {
  content: "10px" !important;
  font-size: 10px;
}
/deep/.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="12px"]::before,
/deep/.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="12px"]::before {
  content: "12px" !important;
  font-size: 12px;
}
/deep/.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="16px"]::before,
/deep/.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="16px"]::before {
  content: "16px" !important;
  font-size: 16px;
}
/deep/.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="18px"]::before,
/deep/.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="18px"]::before {
  content: "18px" !important;
  font-size: 18px;
}
/deep/.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="20px"]::before,
/deep/.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="20px"]::before {
  content: "20px" !important;
  font-size: 20px;
}
/deep/.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="30px"]::before,
/deep/.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="30px"]::before {
  content: "30px" !important;
  font-size: 30px;
}
/deep/.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="32px"]::before,
/deep/.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="32px"]::before {
  content: "32px" !important;
  font-size: 32px;
}

/deep/.ql-snow .ql-picker.ql-header .ql-picker-label::before,
/deep/.ql-snow .ql-picker.ql-header .ql-picker-item::before {
  content: "文本" !important;
}
/deep/.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
/deep/.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
  content: "标题1" !important;
}
/deep/.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
/deep/.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
  content: "标题2" !important;
}
/deep/.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
/deep/.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
  content: "标题3" !important;
}
/deep/.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
/deep/.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
  content: "标题4" !important;
}
/deep/.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
/deep/.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
  content: "标题5" !important;
}
/deep/.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
/deep/.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
  content: "标题6" !important;
}

/deep/.ql-snow .ql-picker.ql-font .ql-picker-label::before,
/deep/.ql-snow .ql-picker.ql-font .ql-picker-item::before {
  content: "标准字体" !important;
}
/deep/.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
/deep/.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
  content: "衬线字体" !important;
}
/deep/.ql-snow
  .ql-picker.ql-font
  .ql-picker-label[data-value="monospace"]::before,
/deep/.ql-snow
  .ql-picker.ql-font
  .ql-picker-item[data-value="monospace"]::before {
  content: "等宽字体" !important;
}

/deep/.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="SimSun"]::before,
/deep/.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="SimSun"]::before {
  content: "宋体" !important;
  font-family: "SimSun";
}

/deep/.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="SimHei"]::before,
/deep/.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="SimHei"]::before {
  content: "黑体" !important;
  font-family: "SimHei";
}

/deep/.ql-snow
  .ql-picker.ql-font
  .ql-picker-label[data-value="Microsoft-YaHei"]::before,
/deep/.ql-snow
  .ql-picker.ql-font
  .ql-picker-item[data-value="Microsoft-YaHei"]::before {
  content: "微软雅黑" !important;
  font-family: "Microsoft YaHei";
}

/deep/.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="KaiTi"]::before,
/deep/.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="KaiTi"]::before {
  content: "楷体" !important;
  font-family: "KaiTi";
}

/deep/.ql-snow
  .ql-picker.ql-font
  .ql-picker-label[data-value="FangSong"]::before,
/deep/.ql-snow
  .ql-picker.ql-font
  .ql-picker-item[data-value="FangSong"]::before {
  content: "仿宋" !important;
  font-family: "FangSong";
}

/deep/.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="Arial"]::before,
/deep/.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="Arial"]::before {
  content: "Arial" !important;
  font-family: "Arial";
}

/deep/.ql-snow
  .ql-picker.ql-font
  .ql-picker-label[data-value="Times-New-Roman"]::before,
/deep/.ql-snow
  .ql-picker.ql-font
  .ql-picker-item[data-value="Times-New-Roman"]::before {
  content: "Times New Roman" !important;
  font-family: "Times New Roman";
}

/deep/.ql-snow
  .ql-picker.ql-font
  .ql-picker-label[data-value="sans-serif"]::before,
/deep/.ql-snow
  .ql-picker.ql-font
  .ql-picker-item[data-value="sans-serif"]::before {
  content: "sans-serif" !important;
  font-family: "sans-serif";
}

/deep/.ql-font-SimSun {
  font-family: "SimSun";
}

/deep/.ql-font-SimHei {
  font-family: "SimHei";
}

/deep/.ql-font-Microsoft-YaHei {
  font-family: "Microsoft YaHei";
}

/deep/.ql-font-KaiTi {
  font-family: "KaiTi";
}

/deep/.ql-font-FangSong {
  font-family: "FangSong";
}

/deep/.ql-font-Arial {
  font-family: "Arial";
}

/deep/.ql-font-Times-New-Roman {
  font-family: "Times New Roman";
}

/deep/.ql-font-sans-serif {
  font-family: "sans-serif";
}
</style>

